<template>
  <div class="coursesNav">
    <van-nav-bar
      :title="title"
      left-text=""
      left-arrow
      fixed="true"
      @click-left="onClickLeft"
      @click-right="onClickRight"
    >
      <template #right>
        <van-icon name="search" size="22" />
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  name: 'CoursesNav',
  data() {
    return {
      title: this.$route.meta.title,
    }
  },
  methods: {
    onClickLeft() {
      history.back()
    },
    // getRoute(){
    //   console.log('route.meta:',this.$route.meta)
    // }
    onClickRight() {
      this.$router.push('/search')
    },
  },
}
</script>

<style lang="less" scoped>
:deep(.van-nav-bar__title) {
  font-weight: bolder;
}
</style>
